package com.cn.hibernate;

import javax.transaction.Transactional;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.cn.hibernate.model.User;
import com.cn.hibernate.service.IUserService;

//@Component
//@Transactional
public class TestChuanbo {
	@Autowired
	private IUserService userService;
	
	public void testUser(){
		User user = new User();
		user.setId(12L);
		user.setName("张三");
		userService.save(user);
		userService.delete(user);
	}
}
